package com.vic.mvc.testsome.redis;

import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;

public class RedisDao {

	private final JedisPool pool;

	
	public RedisDao(String host, int port){
		pool = new JedisPool(host, port);
	}
	
	
	
	public Object getObject(long id) {
		try{
			Jedis jedis = pool.getResource();
			
			try{
				String key = "test" + id;
				//并没有实现内部序列号
				//  get -> byte[] ->反序列化->Object
				//采用自定义序列化
				
			}catch(Exception e){
				
			}finally {
				jedis.close();
			}
		}catch(Exception e) {
			
		}
		
		return null;
	}
	
	
}
